package com.kf.lib_network.interceptor

import com.blankj.utilcode.util.SPUtils
import okhttp3.Interceptor
import okhttp3.Response

class TokenInterceptor : Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val builder = chain.request().newBuilder()
        val token = SPUtils.getInstance().getString("token")
        builder.addHeader("token", token)
        return chain.proceed(builder.build())
    }
}